Initialize Payment Collection
Initiate a payment request to generate a unique payment reference, payment code and checkout URL for your customers
POST
https://api.spotflow.co/api/v1/payments/initialize
Headers
authorization |
|
---|---|
content-type String | application/json |
Body Parameters
reference | Specify a unique reference ID generated by your company to identify each customer. |
---|---|
amount Integer | Amount should be in the subunit of our supported currency i.e your local currency or USD. |
currency String | Select the currency for the charges. Can either be in USD or in the local currency of your collection region. |
customer email String | The customer’s email address |
Sample Request Body
{
"reference": "ref-{{$randomUUID}}",
"amount": 5000,
"currency": "NGN",
"customer": {
"email": "customer@email.com"
}
}
Sample Response
200 OK
{
"reference": "ref-17d73b59-69ce-4499-891a-7932e7933890",
"checkoutUrl": "https://checkout.spotflow.co/B6vnktDvISo",
"paymentCode": "B6vnktDvISo",
"status": "pending"
}
Confirm the payment collection outcome via the webhook URL set up on your dashboard or by using our Verify Payment Collection Endpoint.